package com.fire.control.system.entity;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.fire.control.system.statics.Type_Report;
import com.fire.control.system.statics.Type_Solution;

/**
 * 
 * @ClassName:  WarningHandle
 * @Description:  故障处理明细表
 * @author:  xiechengguang
 * @date:  2017年6月7日 下午3:11:43
 *
 */
@Entity
@Table(name = "t_warning_handle")
public class WarningHandle extends BaseEntity {

	private static final long serialVersionUID = 1L;
	
	/**
	 * 处理描述
	 */
	@Column(name = "solution_desc")
	private String solutionDesc;
	
	/**
	 * 报告现场类型
	 */
	@Column(name = "report_type", nullable = false,length=20)
	@Enumerated(EnumType.STRING)
	private Type_Report reportType;
	
	/**
	 * 处理人
	 */
	@Column(name = "trustees")
	private String trustees;
	
	/**
	 * 处理时间
	 */
	@Column(name = "end_time")
	@Temporal(TemporalType.DATE)
	private Date endTime;
	
	@ManyToOne(cascade={CascadeType.REFRESH},  
            fetch=FetchType.EAGER,optional=false)
	@JoinColumn(name = "warning_info_id")
	private WarningInfo warningInfo;
	
	@Column(name = "solution_type", nullable = false,length=20)
	@Enumerated(EnumType.STRING)
	private Type_Solution solutionType;
	
	/**
	 * 用户id
	 */
	@Column(name = "user_id")
	private String userId;
	
	
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Type_Report getReportType() {
		return reportType;
	}

	public void setReportType(Type_Report reportType) {
		this.reportType = reportType;
	}

	public WarningInfo getWarningInfo() {
		return warningInfo;
	}

	public void setWarningInfo(WarningInfo warningInfo) {
		this.warningInfo = warningInfo;
	}

	public String getSolutionDesc() {
		return solutionDesc;
	}

	public void setSolutionDesc(String solutionDesc) {
		this.solutionDesc = solutionDesc;
	}

	public String getTrustees() {
		return trustees;
	}

	public void setTrustees(String trustees) {
		this.trustees = trustees;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public Type_Solution getSolutionType() {
		return solutionType;
	}

	public void setSolutionType(Type_Solution solutionType) {
		this.solutionType = solutionType;
	}
	
	
}
